package lab02.test09;

public class Student {
    //属性:“学号”、“班号”、“姓名”、“性别”、“年龄”，
    private String sno;
    private String classnum;
    private String name;
    private String sex;
    private int age;
    //方法有“获得学号”、“获得班号”、“获得性别”、“获得姓名”、“获得年龄”、“获得年龄”。

    public String getSno() {
        return sno;
    }
    public String getClassnum() {
        return classnum;
    }
    public String getName() {
        return name;
    }
    public String getSex() {
        return sex;
    }
    public int getAge() {
        return age;
    }
    public String toString(String sno,String  classnum,String name,String sex,int age ){
    this.sno=sno;
    this.classnum=classnum;
    this.name=name;
    this.sex=sex;
    this.age=age;
        String Student="学号:"+sno+"班号:"+classnum+"姓名:"+name+"性别:"+sex+"年龄:"+age;
        return Student;
    }
}
